class RedPacketPanel extends BasePanel{
	private okBtn:eui.Rect;
	private okLbl:eui.Label;
	public constructor(index: number = GameConfig.uiIndex.redpacket) {
		super(index);
		this.skinName = "RedPacketPanelSkin";
	}

	private okBtnCliked(){
		platform.openCustomerServiceConversation({
			// showMessageCard:false
			sessionFrom:"customService",
		});
		App.EventManager.dispatchEvent(GameConstants.UI_REMOVE_FROM_PARENT, this.index);
	}
	/**添加监听 */
	public addListener(){
		super.addListener();
		this.okBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.okBtnCliked,this);
		this.okLbl.addEventListener(egret.TouchEvent.TOUCH_TAP,this.okBtnCliked,this);
		
	}
	/**移除监听 */
	public removeListener(){
		super.removeListener();
		this.okBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.okBtnCliked,this);
		this.okLbl.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.okBtnCliked,this);
	}
}